﻿// Decompiled with JetBrains decompiler
// Type: System.Web.Razor.Text.TextDocumentReader
// Assembly: System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// MVID: 682513D6-F37E-48AC-9909-F3EE103CFF14
// Assembly location: D:\Project\Idea\无人机外网\uav\客户端工程\排查工具\bin\Release\System.Web.Razor.dll

using System.IO;

namespace System.Web.Razor.Text
{
  /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Provides reader for text document.</summary>
  public class TextDocumentReader : TextReader, ITextDocument, ITextBuffer
  {
    /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Initializes a new instance of the <see cref="T:System.Web.Razor.Text.TextDocumentReader" /> class.</summary>
    /// <param name="source">The source to read.</param>
    public TextDocumentReader(ITextDocument source) => this.Document = source;

    internal ITextDocument Document { get; private set; }

    /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the location of the document.</summary>
    /// <returns>The location of the document.</returns>
    public SourceLocation Location => this.Document.Location;

    /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets the length of the document.</summary>
    /// <returns>The length of the document.</returns>
    public int Length => this.Document.Length;

    /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Gets or sets the position of the text document.</summary>
    /// <returns>The position of the text document.</returns>
    public int Position
    {
      get => this.Document.Position;
      set => this.Document.Position = value;
    }

    /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Reads a specified text document.</summary>
    /// <returns>The text document.</returns>
    public override int Read() => this.Document.Read();

    /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.Returns the next text document to read.</summary>
    /// <returns>The next text document to read.</returns>
    public override int Peek() => this.Document.Peek();
  }
}
